/*  1:   */ package org.jetbrains.jps.model.module.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.JpsElement;
import org.jetbrains.jps.model.JpsElementCreator;
import org.jetbrains.jps.model.ex.JpsCompositeElementBase;
import org.jetbrains.jps.model.ex.JpsElementChildRoleBase;
import org.jetbrains.jps.model.library.sdk.JpsSdkReference;
import org.jetbrains.jps.model.library.sdk.JpsSdkType;
import org.jetbrains.jps.model.module.JpsSdkReferencesTable;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */
/* 12:   */
/* 13:   */ 
/* 14:   */ public class JpsSdkReferencesTableImpl
/* 15:   */   extends JpsCompositeElementBase<JpsSdkReferencesTableImpl>
/* 16:   */   implements JpsSdkReferencesTable
/* 17:   */ {
/* 18:32 */   public static final JpsSdkReferencesTableRole ROLE = new JpsSdkReferencesTableRole();
/* 19:   */   
/* 20:   */   public JpsSdkReferencesTableImpl() {}
/* 21:   */   
/* 22:   */   private JpsSdkReferencesTableImpl(JpsSdkReferencesTableImpl paramJpsSdkReferencesTableImpl)
/* 23:   */   {
/* 24:39 */     super(paramJpsSdkReferencesTableImpl);
/* 25:   */   }
/* 26:   */   
/* 27:   */   @NotNull
/* 28:   */   public JpsSdkReferencesTableImpl createCopy()
/* 29:   */   {
/* 30:45 */     void tmp8_5 = new JpsSdkReferencesTableImpl(this);
/* 31:45 */     if (tmp8_5 == null) {
/* 32:45 */       throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsSdkReferencesTableImpl", "createCopy" }));
/* 33:   */     }
/* 34:45 */     return tmp8_5;
/* 35:   */   }
/* 36:   */   
/* 37:   */   public <P extends JpsElement> void setSdkReference(@NotNull JpsSdkType<P> paramJpsSdkType, @Nullable JpsSdkReference<P> paramJpsSdkReference)
/* 38:   */   {
/* 39:50 */     if (paramJpsSdkType == null) {
/* 40:50 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsSdkReferencesTableImpl", "setSdkReference" }));
/* 41:   */     }
/* 42:50 */     JpsSdkReferenceRole localJpsSdkReferenceRole = new JpsSdkReferenceRole(paramJpsSdkType);
/* 43:51 */     if (paramJpsSdkReference != null) {
/* 44:52 */       this.myContainer.setChild(localJpsSdkReferenceRole, paramJpsSdkReference);
/* 45:   */     } else {
/* 46:55 */       this.myContainer.removeChild(localJpsSdkReferenceRole);
/* 47:   */     }
/* 48:   */   }
/* 49:   */   
/* 50:   */   public <P extends JpsElement> JpsSdkReference<P> getSdkReference(@NotNull JpsSdkType<P> paramJpsSdkType)
/* 51:   */   {
/* 52:61 */     if (paramJpsSdkType == null) {
/* 53:61 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/module/impl/JpsSdkReferencesTableImpl", "getSdkReference" }));
/* 54:   */     }
/* 55:61 */     return (JpsSdkReference)this.myContainer.getChild(new JpsSdkReferenceRole(paramJpsSdkType));
/* 56:   */   }
/* 57:   */   
/* 58:   */   private static class JpsSdkReferencesTableRole
/* 59:   */     extends JpsElementChildRoleBase<JpsSdkReferencesTable>
/* 60:   */     implements JpsElementCreator<JpsSdkReferencesTable>
/* 61:   */   {
/* 62:   */     public JpsSdkReferencesTableRole()
/* 63:   */     {
/* 64:66 */       super();
/* 65:   */     }
/* 66:   */     
/* 67:   */     @NotNull
/* 68:   */     public JpsSdkReferencesTable create()
/* 69:   */     {
/* 70:72 */       void tmp7_4 = new JpsSdkReferencesTableImpl();
/* 71:72 */       if (tmp7_4 == null) {
/* 72:72 */         throw new IllegalStateException(String.format("@NotNull method %s.%s must not return null", new Object[] { "org/jetbrains/jps/model/module/impl/JpsSdkReferencesTableImpl$JpsSdkReferencesTableRole", "create" }));
/* 73:   */       }
/* 74:72 */       return tmp7_4;
/* 75:   */     }
/* 76:   */   }
/* 77:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.module.impl.JpsSdkReferencesTableImpl

 * JD-Core Version:    0.7.0.1

 */